#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>

int main()
{
    pid_t id=fork();
    if(id>0)
    {
        //父进程
        printf("I am parent process, pid:%d, ppid:%d\n",getpid(),getppid());
    }
    else if(id==0)
    {
        //子进程
        printf("I am child process, pid:%d, ppid:%d\n",getpid(),getppid());
    }
    printf("hello linux\n");
    return 0;
}

